<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%--
  Created by IntelliJ IDEA.
  User: 光的代言人
  Date: 2024/12/20
  Time: 0:06
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>商品信息管理</title>
    <link rel="stylesheet" href="../../css/list.css">
</head>
<body>
<div class="container">
    <h2 class="page-title">商品信息管理</h2>

    <form action="/houtai/goodsInfo/delete" method="post">
        <table class="product-table">
            <tr>
                <th style="width:50px;">多选</th>
                <th style="width:120px;">商品编号</th>
                <th style="width:150px;">商品名称</th>
                <th style="width:100px;">商品照片</th>
                <th style="width:150px;">生产厂家</th>
                <th style="width:100px;">销售价格</th>
                <th style="width:100px;">商品类型</th>
                <th>商品介绍</th>
                <th style="width:150px;">操作</th>
            </tr>
            <c:forEach items="${goodsInfoList}" var="map">
                <tr>
                    <td>
                        <input type="checkbox" class="checkbox" name="id" value="${map.goods_id}">
                    </td>
                    <td>${map.goods_id}</td>
                    <td>${map.goods_name}</td>
                    <td>
                        <img src="/goodsPic/${map.pic}" alt="" style="width: 80px;object-fit: cover;">
                    </td>
                    <td>${map.manufacturer}</td>
                    <td class="price">¥${map.price}</td>
                    <td>${map.type}</td>
                    <td>${map.description}</td>
                    <td class="operation-cell">
                        <a href="/houtai/goodsInfo/update?id=${map.goods_id}" class="btn btn-edit">修改</a>
                        <a href="/houtai/goodsInfo/delete?id=${map.goods_id}" class="btn btn-delete">删除</a>
                    </td>
                </tr>
            </c:forEach>

        </table>

        <div class="toolbar">
            <div class="left-tools">
                <%--            <a href="/houtai/goodsInfo/delete" class="btn btn-batch-delete">批量删除</a>--%>
                <button class="btn btn-batch-delete">批量删除</button>

            </div>
            <div class="right-tools">
                <a href="/houtai/goodsInfo/add" class="btn btn-add">添加商品</a>
                <%--            <button class="btn btn-add">添加商品</button>--%>
            </div>
        </div>
    </form>
</div>
</body>
</html>
